using System;
using System.BusinessObjects.Transactions;
using Blazing.BusinessObjects.Cms;
using NHibernate;
using NHibernate.Criterion;

namespace Blazing.BusinessObjects.Queries
{
    public class QrySearchStatisticSessionsByKey
    {
        public static ICriteria Query(string key)
        {
            ICriteria qry = UnitOfWork.CurrentSession.CreateCriteria(typeof(StatisticSession));
            qry.Add(Expression.Eq("SessionKey", key));
            qry.AddOrder(Order.Asc("SessionKey"));
            return qry;
        }
    }
}
